package org.webmev.utils;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class WriteableInputStream extends InputStream {

        private final InputStream in;

        public WriteableInputStream(InputStream in) { this.in = in; }

        @Override
        public int read() throws IOException { return in.read(); }

        public void writeTo (OutputStream out) throws IOException { for (int c; (c = read ()) != -1; out.write(c)); }
    }